
<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	
            <tr>
           		<th><span>来源：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="source" value="" data-options="fit:true"></input></div>
           		</td>
           	</tr>
            <tr>	
           		<th><span>书名：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="book_name" value="" data-options="fit:true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span>阅读地址：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="url" value="" data-options="fit:true"></input></div>
           		</td>
           	</tr>
            <tr>	
           		<th><span>状态：</span></th>
               	<td>
	            	<div class="wrap_input"><input class="easyui-combobox" id="status" name="status" value="" data-options="
	            				valueField: 'id',
   								textField: 'text',
   								fit:true,
	            				data: [
	            					{id:'', text:''}
	            					,{id:'2', text:'采集完'}
	            					,{id:'1', text:'采集中'}
	            					,{id:'0', text:'未采集'}
	            				]
	            				
	            	" /></div>      	
           		</td>
            </tr>
            <tr>
           		<th><span>内容：</span></th>
               	<td>
               		<div class="wrap_input textarea"><textarea name="js_content" class="easyui-validatebox" data-options="required:true" rows="5"></textarea></div>
           		</td>
            </tr>
            <tr>
           		<th><span>创建时间：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="create_time" value="" data-options="fit:true, required:true"></input></div>
           		</td>
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
       	    "model.source": $(":input[name='source']").val(), 
       	    "model.book_name": $(":input[name='book_name']").val(), 
       	    "model.url": $(":input[name='url']").val(), 
       	    "model.status": $(":input[name='status']").val(), 
       	    "model.create_time": $(":input[name='create_time']").val(), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
